package com.yxinsur.imc.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxinsur.imc.business.domain.ImcRepoIns;
import com.yxinsur.imc.business.form.RepoInsForm;
import com.yxinsur.imc.business.vo.RepoInsVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 保险产品库(险种)Mapper接口
 *
 * @author imc
 * @date 2021-03-26
 */
@Mapper
public interface ImcRepoInsMapper extends BaseMapper<ImcRepoIns> {
    /**
     * 查询保险产品库(险种)列表
     *
     * @param repoInsForm 保险产品库(险种)
     * @return 保险产品库(险种)集合
     */
    List<RepoInsVo> selectImcRepoInsList(RepoInsForm repoInsForm);

    /**
     * 根据{险种ID}查询险种信息
     *
     * @param repoInsId 险种ID
     * @return 险种信息
     */
    RepoInsVo getImcRepoInsById(@Param("repoInsId") Long repoInsId);

    /**
     * 根据{供应商险种代码}{供应商id}查询保险产品库险种
     *
     * @param insCode    险种内部代码
     * @param supplierId 供应商id
     * @return ImcRepoIns
     */
    ImcRepoIns getImcRepoInsBySupplierInsCode(@Param("insCode") String insCode, @Param("supplierId") Long supplierId);

    /**
     * 根据险种代码和供应商ID查询险种
     *
     * @param insCode    险种代码
     * @param supplierId 险种代码
     * @return ImcRepoIns
     */
    ImcRepoIns getImcRepoInsByInsCode(@Param("insCode") String insCode, @Param("supplierId") Long supplierId);
}
